home *** CD-ROM | disk | FTP | other *** search
/ Ultra Gameplayers 101 / Ultra Game Players Magazine, No. 101 - September 1997 (Imagine Publishing, Inc.)(1997).iso / pc / new_ugp.dxr / 00244.ls < prev    next >
Encoding:
Text File  |  1997-07-10  |  1.9 KB  |  52 lines

  1. global platformsDatabase, bootcampDatabase, coverDatabase, cryptDatabase, onlineDatabase, creditsDatabase, titleDatabase
  2.  
  3. on InitAllGameLists
  4.   if voidp(titleDatabase) then
  5.     put "titleDatabase is void"
  6.   else
  7.     InitPlatforms()
  8.     InitGameList(getrecords(titleDatabase, #all, "bootcamp"), "bootcamp games")
  9.     InitGameList(getrecords(titleDatabase, #features, "coverstory"), "featured games")
  10.     InitGameList(getrecords(titleDatabase, #reviews, "coverstory"), "reviewed games")
  11.     InitGameList(getrecords(titleDatabase, #all, "crypt"), "crypt games")
  12.     InitCodebook()
  13.   end if
  14. end
  15.  
  16. on InitPlatforms gameRecords
  17.   set platformList to ["Nintendo 64", "PlayStation", "Saturn", "PC", "Macintosh", "Other"]
  18.   repeat with platformName in platformList
  19.     set gameRecords to getrecords(titleDatabase, symbol(platformName), "platforms")
  20.     set gameListMember to "platforms" && platformName
  21.     InitGameList(gameRecords, gameListMember)
  22.   end repeat
  23. end
  24.  
  25. on InitCodebook
  26.   set platformList to ["Nintendo 64", "PlayStation", "Saturn", "Other"]
  27.   repeat with platformName in platformList
  28.     set gameRecords to getrecords(titleDatabase, symbol(platformName), "codebook")
  29.     set gameListMember to "codebook" && platformName
  30.     InitGameList(gameRecords, gameListMember)
  31.   end repeat
  32. end
  33.  
  34. on InitGameList gameRecords, gameListMember
  35.   if the number of member gameListMember > 0 then
  36.     if listp(gameRecords) then
  37.       set game to getAt(gameRecords, 1)
  38.       set gameListText to the name of game
  39.       repeat with gameIndex = 2 to count(gameRecords)
  40.         set game to getAt(gameRecords, gameIndex)
  41.         set gameListText to gameListText & RETURN & the name of game
  42.       end repeat
  43.       set the text of member gameListMember to gameListText
  44.     else
  45.       put "No games in that category"
  46.       set the text of member gameListMember to " "
  47.     end if
  48.   else
  49.     put "InitPlatform -- Bad cast member name:" && gameListMember
  50.   end if
  51. end
  52.